package com.fulihui.usercore.api;

import org.near.servicesupport.request.TRequest;
import org.near.servicesupport.result.BaseResult;
import org.near.servicesupport.result.TMultiResult;
import org.near.servicesupport.result.TSingleResult;

import com.fulihui.usercore.condition.CooperationInfoCondition;
import com.fulihui.usercore.dto.CooperationInfoDTO;
import com.fulihui.usercore.request.merchant.CooperationInfoSaveRequest;

/**
 * 分表分库 无需修改
 * 合作方式信息服务
 * @author Willard.Hu on 2016/9/22 0022.
 */
public interface CooperationInfoService {
    /**
     * 新增或保存合作方式信息，id主键判断，-1时新增，否则修改，字段null值不会被处理
     * @param request {@link CooperationInfoSaveRequest}
     * @return 接口执行结果 {@link BaseResult}
     */
    TSingleResult<Integer> save(CooperationInfoSaveRequest request);

    /**
     * 删除合作方式信息
     * @param request 主键
     * @return 接口执行结果 {@link BaseResult}
     */
    BaseResult delete(TRequest<Integer> request);

    /**
     * 查询条件查询多个合作方式
     * @param request {@link CooperationInfoCondition}
     * @return 合作方式列表 {@link CooperationInfoDTO}
     */
    TMultiResult<CooperationInfoDTO> query(TRequest<CooperationInfoCondition> request);
}
